import time

from selenium import webdriver
driver = webdriver.Chrome()
driver.get("https://www.baidu.com")
js = "alter(111)"
driver.execute_script(js)

time.sleep(2)
driver.quit()